<template>
	<uni-nav-bar
	:fixed="true"
	:border="false" 
	background-color="transparent" 
	:shadow="false" 
	:status-bar="true">
		<template v-slot:right>
			<view @click="onLogout" class="nav-bar l-f l-row-c" hover-class="hover-class">
				<image class="nav-bar_icon" src="@/static/images/logout.png" mode="widthFix"></image>
			</view>
		</template>
	</uni-nav-bar>
</template>

<script>
	export default {
		name:"nav-bar",
		data() {
			return {
				
			};
		},
		methods: {
			// 退出登录
			onLogout() {
				uni.showModal({
					title: '提示',
					content: '确定退出登录吗?',
					success: (e) => {
						if(e.confirm) {
							uni.navigateTo({
								url: '/pages/login/login',
								animationType: 'fade-in'
							})
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.nav-bar {
	width: 60rpx;
	height: 60rpx;
	&_icon {
		width: 48rpx;
		height: 48rpx;
	}
}
</style>